package com.example.supernote.data.network.config

import kotlinx.serialization.Serializable

class ImageOCRRequestBody(
    val image: String = "",
    private val pos: String = "2",
    private val businessid: String = "1990173156ceb8a09eee80c293135279"
) {
    fun getMap(): Map<String, String> {
        return mapOf (
            "image" to image,
            "pos" to pos,
            "businessid" to businessid
        )
    }
}

@Serializable
data class OcrXY(
    var x: Double,
    var y: Double
)

@Serializable
data class OcrItemLocation(
    val top_left: OcrXY,
    val top_right: OcrXY,
    val down_left: OcrXY,
    val down_right: OcrXY,
)

@Serializable
data class OcrItems(
    val words: String,
    val location: OcrItemLocation
)

@Serializable
data class OcrResult(
    val OCR: List<OcrItems> = listOf(),
    val angle: Int = 0
)

@Serializable
data class ImageOCRResponse(
    val error_code: Int,
    val error_msg: String,
    val result: OcrResult
)